package com.goldcn.orderborrow.erpbean;

import io.swagger.annotations.ApiModelProperty;

import java.math.BigDecimal;

/**
 * erp借货订单表
 */
public class BorrowInfo {
    @ApiModelProperty(required = true, value = "借货单id")
    private String borrowID;
    @ApiModelProperty(required = true, value = "借货单号")
    private String borrowNO;
    @ApiModelProperty(required = true, value = "借货时间")
    private Long borrowTime;
    @ApiModelProperty(required = true, value = "借货人")
    private String borrowUser;
    @ApiModelProperty(required = true, value = "借货单位id")
    private String unit;
    @ApiModelProperty(required = true, value = "借货单位名称")
    private String unitName;

    @ApiModelProperty(required = false, hidden=true)
    private String borrowStore;
    @ApiModelProperty(required = false, hidden=true)
    private Integer state;
    @ApiModelProperty(required = false, value = "归还方式")
    private Integer returnType;
    @ApiModelProperty(required = true, value = "货品数量")
    private Integer qty;
    @ApiModelProperty(required = true, value = "货品金额")
    private BigDecimal amount;
    @ApiModelProperty(required = false, hidden=true)
    private String businessUser;
    @ApiModelProperty(required = true, value = "经手人姓名")
    private String businessUserName;
    @ApiModelProperty(required = false, hidden=true)
    private String expressNum;
    @ApiModelProperty(required = false, hidden=true)
    private String expressCompany;
    @ApiModelProperty(required = false, hidden=true)
    private String expressCompanyCode;
    @ApiModelProperty(required = false, hidden=true)
    private String expressCompanyName;
    @ApiModelProperty(required = false, hidden=true)
    private String receiveUser;
    @ApiModelProperty(required = true, value = "收货人姓名")
    private String receiveUserName;
    @ApiModelProperty(required = true, value = "收货人手机")
    private String receiveUserPhone;
    @ApiModelProperty(required = true, value = "收货人省编码")
    private Integer receiveProvince;
    @ApiModelProperty(required = true, value = "收货人市编码")
    private Integer receiveCity;
    @ApiModelProperty(required = true, value = "收货人区编码")
    private Integer receiveDistrict;
    @ApiModelProperty(required = true, value = "收货人省")
    private String receiveProvinceC;
    @ApiModelProperty(required = true, value = "收货人市")
    private String receiveCityC;
    @ApiModelProperty(required = true, value = "收货人区")
    private String receiveDistrictC;
    @ApiModelProperty(required = true, value = "收货人短地址（去除省市区）")
    private String receiveAddress;
    @ApiModelProperty(required = false, value = "留言")
    private String memo;

    @ApiModelProperty(required = false, hidden=true)
    private Integer source;
    @ApiModelProperty(required = false, hidden=true)
    private Integer isLock;
    @ApiModelProperty(required = false, hidden=true)
    private String areaCode;
    @ApiModelProperty(required = false, hidden=true)
    private String areaName;
    @ApiModelProperty(required = false, hidden=true)
    private String parentSaleUnit;
    @ApiModelProperty(required = false, hidden=true)
    private String parentSaleUnitName;
    @ApiModelProperty(required = false, hidden=true)
    private Long checkTime;
    @ApiModelProperty(required = false, hidden=true)
    private Long outStoreTime;
    @ApiModelProperty(required = false, hidden=true)
    private Long sendTime;
    @ApiModelProperty(required = false, hidden=true)
    private Long receiveTime;
    @ApiModelProperty(required = false, hidden=true)
    private Long returnTime;
    @ApiModelProperty(required = false, hidden=true)
    private String addUser;
    @ApiModelProperty(required = false, hidden=true)
    private String addUserName;
    @ApiModelProperty(required = false, hidden=true)
    private Long addTime;
    @ApiModelProperty(required = false, hidden=true)
    private String updateuser;
    @ApiModelProperty(required = false, hidden=true)
    private Long updateTime;
    @ApiModelProperty(required = false, hidden=true)
    private String accountID;
    @ApiModelProperty(required = false, hidden=true)
    private String checkUser;
    @ApiModelProperty(required = false, hidden=true)
    private String checkUserName;
    @ApiModelProperty(required = false, hidden=true)
    private String returnRemark;
    @ApiModelProperty(required = false, hidden=true)
    private String remark;


    @ApiModelProperty(value = "分行ID")
    private Long branchID;
    @ApiModelProperty(value = "二级分行ID")
    private Long twoLevelBranchID;
    @ApiModelProperty(value = "支行ID")
    private Long subbranchID;

    public String getBorrowID() {
        return borrowID;
    }

    public void setBorrowID(String borrowID) {
        this.borrowID = borrowID;
    }

    public String getBorrowNO() {
        return borrowNO;
    }

    public void setBorrowNO(String borrowNO) {
        this.borrowNO = borrowNO;
    }

    public Long getBorrowTime() {
        return borrowTime;
    }

    public void setBorrowTime(Long borrowTime) {
        this.borrowTime = borrowTime;
    }

    public String getBorrowUser() {
        return borrowUser;
    }

    public void setBorrowUser(String borrowUser) {
        this.borrowUser = borrowUser;
    }

    public String getUnit() {//获取组织ID,取最后一级
        if (null!=this.getSubbranchID() && 0 < this.getSubbranchID()){
            return this.getSubbranchID().toString();
        }else if (null!=this.getTwoLevelBranchID() && 0  < this.getTwoLevelBranchID()){
            return this.getTwoLevelBranchID().toString();
        }else if(null!=this.getBranchID() && 0  < this.getBranchID()){
            return this.getBranchID().toString();
        }else{
            return "0";
        }
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    public String getBorrowStore() {
        return borrowStore;
    }

    public void setBorrowStore(String borrowStore) {
        this.borrowStore = borrowStore;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getReturnType() {
        return returnType;
    }

    public void setReturnType(Integer returnType) {
        this.returnType = returnType;
    }

    public Integer getQty() {
        return qty;
    }

    public void setQty(Integer qty) {
        this.qty = qty;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public String getBusinessUser() {
        return businessUser;
    }

    public void setBusinessUser(String businessUser) {
        this.businessUser = businessUser;
    }

    public String getBusinessUserName() {
        return businessUserName;
    }

    public void setBusinessUserName(String businessUserName) {
        this.businessUserName = businessUserName;
    }

    public String getExpressNum() {
        return expressNum;
    }

    public void setExpressNum(String expressNum) {
        this.expressNum = expressNum;
    }

    public String getExpressCompany() {
        return expressCompany;
    }

    public void setExpressCompany(String expressCompany) {
        this.expressCompany = expressCompany;
    }

    public String getExpressCompanyCode() {
        return expressCompanyCode;
    }

    public void setExpressCompanyCode(String expressCompanyCode) {
        this.expressCompanyCode = expressCompanyCode;
    }

    public String getExpressCompanyName() {
        return expressCompanyName;
    }

    public void setExpressCompanyName(String expressCompanyName) {
        this.expressCompanyName = expressCompanyName;
    }

    public String getReceiveUser() {
        return receiveUser;
    }

    public void setReceiveUser(String receiveUser) {
        this.receiveUser = receiveUser;
    }

    public String getReceiveUserName() {
        return receiveUserName;
    }

    public void setReceiveUserName(String receiveUserName) {
        this.receiveUserName = receiveUserName;
    }

    public String getReceiveUserPhone() {
        return receiveUserPhone;
    }

    public void setReceiveUserPhone(String receiveUserPhone) {
        this.receiveUserPhone = receiveUserPhone;
    }

    public Integer getReceiveProvince() {
        return receiveProvince;
    }

    public void setReceiveProvince(Integer receiveProvince) {
        this.receiveProvince = receiveProvince;
    }

    public Integer getReceiveCity() {
        return receiveCity;
    }

    public void setReceiveCity(Integer receiveCity) {
        this.receiveCity = receiveCity;
    }

    public Integer getReceiveDistrict() {
        return receiveDistrict;
    }

    public void setReceiveDistrict(Integer receiveDistrict) {
        this.receiveDistrict = receiveDistrict;
    }

    public String getReceiveProvinceC() {
        return receiveProvinceC;
    }

    public void setReceiveProvinceC(String receiveProvinceC) {
        this.receiveProvinceC = receiveProvinceC;
    }

    public String getReceiveCityC() {
        return receiveCityC;
    }

    public void setReceiveCityC(String receiveCityC) {
        this.receiveCityC = receiveCityC;
    }

    public String getReceiveDistrictC() {
        return receiveDistrictC;
    }

    public void setReceiveDistrictC(String receiveDistrictC) {
        this.receiveDistrictC = receiveDistrictC;
    }

    public String getReceiveAddress() {
        return receiveAddress;
    }

    public void setReceiveAddress(String receiveAddress) {
        this.receiveAddress = receiveAddress;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    public Integer getSource() {
        return source;
    }

    public void setSource(Integer source) {
        this.source = source;
    }

    public Integer getIsLock() {
        return isLock;
    }

    public void setIsLock(Integer isLock) {
        this.isLock = isLock;
    }

    public String getAreaCode() {
        return areaCode;
    }

    public void setAreaCode(String areaCode) {
        this.areaCode = areaCode;
    }

    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    public String getParentSaleUnit() {
        return parentSaleUnit;
    }

    public void setParentSaleUnit(String parentSaleUnit) {
        this.parentSaleUnit = parentSaleUnit;
    }

    public String getParentSaleUnitName() {
        return parentSaleUnitName;
    }

    public void setParentSaleUnitName(String parentSaleUnitName) {
        this.parentSaleUnitName = parentSaleUnitName;
    }

    public Long getCheckTime() {
        return checkTime;
    }

    public void setCheckTime(Long checkTime) {
        this.checkTime = checkTime;
    }

    public Long getOutStoreTime() {
        return outStoreTime;
    }

    public void setOutStoreTime(Long outStoreTime) {
        this.outStoreTime = outStoreTime;
    }

    public Long getSendTime() {
        return sendTime;
    }

    public void setSendTime(Long sendTime) {
        this.sendTime = sendTime;
    }

    public Long getReceiveTime() {
        return receiveTime;
    }

    public void setReceiveTime(Long receiveTime) {
        this.receiveTime = receiveTime;
    }

    public Long getReturnTime() {
        return returnTime;
    }

    public void setReturnTime(Long returnTime) {
        this.returnTime = returnTime;
    }

    public String getAddUser() {
        return addUser;
    }

    public void setAddUser(String addUser) {
        this.addUser = addUser;
    }

    public String getAddUserName() {
        return addUserName;
    }

    public void setAddUserName(String addUserName) {
        this.addUserName = addUserName;
    }

    public Long getAddTime() {
        return addTime;
    }

    public void setAddTime(Long addTime) {
        this.addTime = addTime;
    }

    public String getUpdateuser() {
        return updateuser;
    }

    public void setUpdateuser(String updateuser) {
        this.updateuser = updateuser;
    }

    public Long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Long updateTime) {
        this.updateTime = updateTime;
    }

    public String getAccountID() {
        return accountID;
    }

    public void setAccountID(String accountID) {
        this.accountID = accountID;
    }

    public String getCheckUser() {
        return checkUser;
    }

    public void setCheckUser(String checkUser) {
        this.checkUser = checkUser;
    }

    public String getCheckUserName() {
        return checkUserName;
    }

    public void setCheckUserName(String checkUserName) {
        this.checkUserName = checkUserName;
    }

    public String getReturnRemark() {
        return returnRemark;
    }

    public void setReturnRemark(String returnRemark) {
        this.returnRemark = returnRemark;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Long getBranchID() {
        return branchID;
    }

    public void setBranchID(Long branchID) {
        this.branchID = branchID;
    }

    public Long getTwoLevelBranchID() {
        return twoLevelBranchID;
    }

    public void setTwoLevelBranchID(Long twoLevelBranchID) {
        this.twoLevelBranchID = twoLevelBranchID;
    }

    public Long getSubbranchID() {
        return subbranchID;
    }

    public void setSubbranchID(Long subbranchID) {
        this.subbranchID = subbranchID;
    }
}